/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package wsreg

import (
	"did-service/controller"

	"github.com/emicklei/go-restful"
)

func RegisterDidManageWebService(ws *restful.WebService, controller *controller.DidController) {
	// did下拉列表
	ws.Route(ws.GET("/v1/did/list").To(controller.ListDidEnum))
	// did分页数据
	ws.Route(ws.GET("/v1/did/page").To(controller.ListDidPage))
	// did创建
	ws.Route(ws.POST("/v1/did/apply").To(controller.CreateDid))
	// did document获取
	ws.Route(ws.GET("/v1/did/{id}").To(controller.GetDidDocument))
	// 删除did
	ws.Route(ws.DELETE("/v1/did/{id}").To(controller.DeleteDid))
}
